Home > Overview revenue-by-order-type card (two parallel stacked bars)
Returns the composition card that sits below the trend chart on Home > Overview. The payload contains two parallel per-day breakdowns — one bucketing paid revenue by order source and one bucketing by whether the buyer is a rep — plus MTD totals with percentage shares for each axis. The frontend renders both bars side by side with a Revenue / Orders toggle.
Spec decision D-2 chose the two-parallel-bar layout (option A)
because the source and buyer axes overlap in the data (a
rep-bought web order lives in both web and rep_bought); a
single cascaded bucket would have masked that overlap.
Authorizations
Bearer token authentication. Requires a company-admin token
whose role holds reports.view. Additionally, the caller's
company must have ANALYTICS_DASHBOARD enabled — otherwise
every endpoint returns 404.
Query Parameters
ISO alpha-2 code of one of the requesting company's configured
countries (see GET /countries). When present, every service
on this endpoint filters its data to that country and reports
money in the country's own currency. Omit (or send "all")
for the aggregate-across-countries view, which is the default
and matches pre-Phase-004 behavior. Unknown ISO codes or ones
the company is not configured for return 400.
"US"
Response
Order-composition card payload
One entry per day of the current calendar month up through
today. Each day's buckets are keyed by order source
(subscription, enrollment, web, mobile,
backoffice, admin).
One entry per day. Each day's buckets are keyed by buyer
type (rep_bought, customer_bought) — the same order
can appear in daily_by_source under its source bucket
and here under its buyer bucket; the two axes overlap by
design (spec decision D-2 option A).
MTD totals + percentage shares keyed by source. All source buckets are present, including ones with zero orders (so the frontend can render a stable legend).
MTD totals + percentage shares keyed by buyer bucket.
ISO 4217 three-letter code (uppercase).
3"USD"